﻿IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'spm_GetAllNotifications')
	BEGIN
		DROP  Procedure  spm_GetAllNotifications
	END

GO


/**
 * 返回和指定人关联的所有的通知
 */ 

CREATE Procedure spm_GetAllNotifications
@UserName varchar(256)
AS

	select * from Notifications where [Users]='' or (','+[Users]+',') like ('%,'+@UserName+',%')

GO
 
